package com.yeswater.multithread.chapter1.test1_4;

/**
 * author : yeswater
 * date : 2023/10/18
 *
 * 测试 currentThread()
 */

public class CountOperate extends Thread {

    public CountOperate() {
        System.out.println("CountOperate---start");
        System.out.println("Thread.currentThread().getName()) : " + Thread.currentThread().getName());
        System.out.println("Thread.currentThread().isAlive() : " + Thread.currentThread().isAlive());
        System.out.println("this.getName() : " + this.getName());
        System.out.println("this.isAlive() : " + this.isAlive());
        System.out.println("CountOperate---end");
    }

    @Override
    public void run() {
        System.out.println("run---start");
        System.out.println("Thread.currentThread().getName() : " + Thread.currentThread().getName());
        System.out.println("Thread.currentThread().isAlive() : " + Thread.currentThread().isAlive());
        System.out.println("this.getName() : " + this.getName());
        System.out.println("this.isAlive() : " + this.isAlive());
        System.out.println("run---end");
    }
}
